﻿@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
    Layout = "umbLayout.cshtml";
}

<div class="container">
    <div class="row">
        <div class="col-md-3 well">
            <h1>Alfabetiskt yvirlit,</h1>
            <p> av bólkum, ið hava sangir undir sær.</p>
        </div>
        <div class="col-md-6">
            @foreach (var letter in Model.Content.Children.OrderBy(x => x.Name))
            {
                if (letter.Children.Any())
                {

                    <div class="panel panel-primary">
                        <div class="panel-heading">
                            <a href="@letter.Url">
                                <h3 class="panel-title">@letter.Name</h3>
                            </a>
                        </div>
                        <div class="panel-body">
                            <ul class="list-group">
                                @foreach (var band in letter.Children().OrderBy(x => x.Name).Take(3))
                                {
                                    <li class="list-group-item">

                                        <a href="@band.Url">
                                            @band.Name <span class="badge pull-right">@band.Children().Count()</span>
                                        </a>
                                    </li>
                                }

                            </ul>
                            @if (letter.Children().Count() > 3)
                            {
                                <a class="btn btn-default pull-right" href="@letter.Url">Vís meira...</a>
                            }
                        </div>
                    </div>
                }
            }
        </div>
        <div class="col-md-3 well">
            @Html.Partial("bandsAlfabet")
        </div>
    </div>
</div>